package cn.com.code.generator.entity.system;

/**
 * Created by laijiaju on 2018-04-24.
 */
public class AssertInfo {

    GenInfo genInfo;
    boolean hasBigDecimal;
    boolean hasDate;
    boolean hasBigDecimalInSearch;
    boolean hasDateInSearch;

    public AssertInfo(GenInfo genInfo){
        this.genInfo = genInfo;
        for(ColumnInfo col : genInfo.getColumnList()){
            if(col.getJavaType().equals("BigDecimal")){
                hasBigDecimal = true;
                if(col.getWhere().equals("true")){
                    hasBigDecimalInSearch = true;
                }
            }
            if(col.getJavaType().equals("Date")){
                hasDate = true;
                if(col.getWhere().equals("true")){
                    hasDateInSearch = true;
                }
            }
        }
    }

    public boolean getHasBigDecimal() {
        return hasBigDecimal;
    }

    public boolean getHasDate() {
        return hasDate;
    }

    public boolean getHasBigDecimalInSearch() {
        return hasBigDecimalInSearch;
    }

    public boolean getHasDateInSearch() {
        return hasDateInSearch;
    }

}
